<%--
  Created by IntelliJ IDEA.
  User: Tolean
  Date: 2018/5/31
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <%@include file="common/head.jspf"%>
    <link rel="Shortcut Icon" href="${lyon}/static/images/favicon.ico"  />
    <title>LYON</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!--[if lte IE 8]><script src="${lyon}/static/assets/js/ie/html5shiv.js"></script><![endif]-->
    <link rel="stylesheet" href="${lyon}/static/assets/css/login.css" />
    <!--[if lte IE 9]><link rel="stylesheet" href="${lyon}/static/assets/css/ie9.css" /><![endif]-->
    <!--[if lte IE 8]><link rel="stylesheet" href="${lyon}/static/assets/css/ie8.css" /><![endif]-->
    <noscript><link rel="stylesheet" href="${lyon}/static/assets/css/noscript.css" /></noscript>
</head>
<body class="is-loading">

<!-- Wrapper -->
<div id="wrapper">
    <!-- Main -->
    <section id="main">
        <header>
            <span class="avatar"><img style="width: 70px;" src="${lyon}/static/images/avatar.jpg" alt="" /></span>
            <h1>Lyon house</h1>
            <p>心有猛虎,细嗅蔷薇.</p>
        </header>

        <hr />
        <form method="post">
            <div class="field">
                <input type="text" name="username" id="username" placeholder="用户名" />
            </div>
            <div class="field">
                <input type="password" name="password" id="password" placeholder="密码" />
            </div>
            <ul class="actions">
                <li><a class="button"onclick="login()">登陆</a></li>
            </ul>
            <div>
                <label id="msg">今天又是轻松愉悦的一天呢.</label>
            </div>
        </form>
        <hr />
        <%--<footer>--%>
            <%--<ul class="icons">--%>
                <%--<li><a href="#" class="fa-twitter">Twitter</a></li>--%>
                <%--<li><a href="#" class="fa-instagram">Instagram</a></li>--%>
                <%--<li><a href="#" class="fa-facebook">Facebook</a></li>--%>
            <%--</ul>--%>
        <%--</footer>--%>
    </section>
</div>

<!-- Scripts -->
<!--[if lte IE 8]><script src="${lyon}/static/assets/js/ie/respond.min.js"></script><![endif]-->
<script>
    if ('addEventListener' in window) {
        window.addEventListener('load', function() { document.body.className = document.body.className.replace(/\bis-loading\b/, ''); });
        document.body.className += (navigator.userAgent.match(/(MSIE|rv:11\.0)/) ? ' is-ie' : '');
    }
    function login() {
        var username=$("#username").val();
        var password=$("#password").val();
        $.post("${lyon}/onstage/adminLogin.do",{username:username,password:password},function (res) {
            if(res.success){
                location.href="${lyon}/admin/home.html";
            }else{
                document.getElementById("msg").innerText=res.msg;
            }
        },"json");
    }
</script>
<script src="${lyon}/static/assets/js/jquery.min.js"></script>
</body>
</html>
